Dynomotion

Group: DynoMotion Message: 12673 From: peterpan1e6 Date: 1/5/2016
Subject: Resetting Encoder Counts in KMotionCNC

Hi


I am using the Encoder view in KMotionCNC. I prefer this view as it relates to the physical position of the table. But when I press the Zero All button or try to set the values nothing happens. Is there a way to reset the values of the encoders displayed?


I also noted that when you zero all the counters and then run a G-Code program when the servos are off, the green display would show a non-zero value about the size of the MaxFollowingError. This value is incorrect as the table did not move. If you then power the servos and run the G-code again, would this value not result in an offset error? Is there a way to correct this error automatically?  


Also, if someone would move the machine table manually, the encoder positions would change but the green display remains the same. Would this cause an offset error?


Group: DynoMotion Message: 12674 From: TKSOFT Date: 1/5/2016
Subject: Re: Resetting Encoder Counts in KMotionCNC

Hi Eon,

Its important to understand the difference between the theoretical commanded destinations and the actual measured positions.  Neither is "incorrect" they are simply two different things.

With a working system the Commanded and Measured positions should match except for a few counts of noise and servo dither in the Measured Positions.  The average of both positions should be exactly the same if the servo loop has any Integrator Term.

If the two positions do not match significanty for any reason the system will fault, the DROs will turn yellow, and the system will need to be re-initialized before the Operator can continue with anything.

I think your experience with operating your system when it is not set up properly shows an issue that would not normally be an issue.

I think most Users prefer to "Zero" based on the Theoretical commanded position because it is the most accurate and predictable representation of where the axis actually is.  For example if GCode moves to a certain position and you push Zero at that position you are guaranteed to set Zero at exactly that certain position and not that certain position plus some small unknown random error.  Repeated "Zeroing" based on the measured encoder position would likely resut in a large amount of drift.

In the event of a crash, following error, or manually moving the axis, the normal recovery proceedure is to re-initialize the system in a way that reads the current Encoder Positions and sets the Commanded Destinations to that same position.  This can be accomplished in your Initialization Program with:

EnableAxisDest(0,ch0->Position);  //enable the axis and set the target Destination to the current encoder Position

After enabling the system in this manner the zero buttons should then zero both the Commanded and Measured Positions.

If you still insist on Zeroing based on the Measured Encoder Position you can add User Buttons to do that if you wish.

Regards
TK




Quoting "eondekoker@... [DynoMotion]" <DynoMotion@yahoogroups.com>:

 

Hi

 

I am using the Encoder view in KMotionCNC. I prefer this view as it relates to the physical position of the table. But when I press the Zero All button or try to set the values nothing happens. Is there a way to reset the values of the encoders displayed?

 

I also noted that when you zero all the counters and then run a G-Code program when the servos are off, the green display would show a non-zero value about the size of the MaxFollowingError. This value is incorrect as the table did not move. If you then power the servos and run the G-code again, would this value not result in an offset error? Is there a way to correct this error automatically?  

 

Also, if someone would move the machine table manually, the encoder positions would change but the green display remains the same. Would this cause an offset error?

 



Group: DynoMotion Message: 12677 From: peterpan1e6 Date: 1/5/2016
Subject: Re: Resetting Encoder Counts in KMotionCNC
Thanks Tom

Could you clarify this with an example? 

- After the KMotion board has power cycled, the Encoders are at 0 and the Command is also 0.
- Now we move the table to is zero position and press Zero All. The Command position is now 0 and the encoder position is now 1000 counts.
- The servos power are switched off and the table is moved manually to encoder count 1111. The Command position is still 0.
- We run the initialisation script and switch on the servo power. This includes EnableAxisDest(0,ch0->Position); Will the command display now be updated to the equivalent of 1111 counts?


 
Group: DynoMotion Message: 12685 From: Tom Kerekes Date: 1/6/2016
Subject: Re: Resetting Encoder Counts in KMotionCNC
Hi Eon,

See below:

On 1/5/2016 12:44 PM, eondekoker@... [DynoMotion] wrote:
 

Thanks Tom


Could you clarify this with an example? 

- After the KMotion board has power cycled, the Encoders are at 0 and the Command is also 0.
>>> yes
- Now we move the table to is zero position and press Zero All. The Command position is now 0 and the encoder position is now 1000 counts.
>>> I don't understand what you mean here.  Moved how?  Manually? Or Commanded to move there?
- The servos power are switched off and the table is moved manually to encoder count 1111. The Command position is still 0.
>>> I thought they were already off? 
- We run the initialisation script and switch on the servo power. This includes EnableAxisDest(0,ch0->Position); Will the command display now be updated to the equivalent of 1111 counts?
>>> But yes.  If the Encoder read 1111 counts when the Initialization was executed the Command would now be 1111 counts and the Encoder will be reading 1111 counts +/- a few counts of servo dither. 

The GCode DROs will now read the equivalent of 1111 counts exactly as the Commanded position (green) or 1111 counts plus dither as Encoder Position (blue).   Unless there are any G92 offsets or fixture offsets or tool offsets in effect.  But regardless, pressing Zero will zero both the Commanded and Measured Encoder Positions.